option (ENABLE_BENCHMARK "Set to FALSE to disable google benchmark" ON)

if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/benchmark/CMakeLists.txt")
	if (ENABLE_BENCHMARK)
       message (WARNING "submodule contrib/benchmark is missing. to fix try run: \n git submodule update --init --recursive")
	   set (ENABLE_BENCHMARK 0)
   endif ()
endif ()

if (ENABLE_BENCHMARK)
	set (BENCHMARK_ENABLE_TESTING 0)
	set (BENCHMARK_ENABLE_INSTALL 0)
	set (BENCHMARK_ENABLE_GTEST_TESTS 0)
    set (BENCHMARK_ENABLE_EXCEPTIONS 1)
endif ()